#include <stdio.h>  
#include<stdlib.h>
#include <string.h>  


char* strcat1(char a[], char b[]) {  
    int i = 0;
    while (b [i] != '\0') 
    {
        a[strlen(a)] =b [i];
        i++;
    }
    a[strlen(a)] = '\0'; 
    return a;
}


char* strcat2(char* a, char* b) {  
    int i = 0;
    while (a[strlen(a)] =b [i] != '\0') 
    {
        i++;
    }
    a[strlen(a)] = '\0'; 
    return a;
}

int main() {  
    char str1[100] = "Hello";  
    char str2[] = "world";  
    char* result1 = strcat1(str1, str2);  
    printf("strcat2: %s\n", result1); 
    char* result2 = strcat2(str1, str2);  
    printf("strcat2: %s\n", result2); 
  
    return 0;  
}  